<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<link id="test" type="text/css" rel="stylesheet" href="resources/htmllink-disable.css"/>
<link id="test_nostyle" type="text/css" rel="stylesheet" />

</head>
<body>
<script>
description('This test checks HTMLLinkElement disabled conforms to HTML5 spec for the bug id #<a href="https://bugs.webkit.org/show_bug.cgi?id=45425">45425</a> .');


var test = document.getElementById('test');
var test_nostyle = document.getElementById('test_nostyle');
// check initial value, should be false
shouldBe('test.disabled', 'false');
// set value to true
test.disabled = true;
shouldBe('test.disabled', 'true');
// Disabled <link> should have a null sheet
shouldBe('test.sheet', 'null');
debug('<br>');
// verify link.sheet is null since it does not contain an href attribute
shouldBe('test_nostyle.sheet', 'null');
// if link.sheet = null link.disabled should be false
shouldBe('test_nostyle.disabled', 'false');
// setting it to true
test_nostyle.disabled = true;
shouldBe('test_nostyle.disabled', 'true');


</script>
</body>
</html>
